﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Controls;
using Ppt = Microsoft.Office.Interop.PowerPoint;
using MVVM.Core;
using ViewComponents.PowerPoint;
using ViewComponents.PowerPoint.ViewModels;

namespace PSCharts
{
    public static class PPTViewModelFactory
    {
        public static ViewModelBase CreateLinkedTextRangeViewModel(Ppt.Presentation pres)
        {
            ViewModelBase vm = LinkedTextRangesViewModel.CreateInstance(pres);

            Control view = new LinkedTextRangesControl();
            view.DataContext = vm;

            vm.View = view;

            return vm;
        }
    }
}
